var express = require('express');
const { create, remove, findAll, removeByBlogId } = require('../controller/message');
const { visParamsId } = require('../middleware/verify');
var router = express.Router();

// 添加评论或留言
router.post('/', create);

// 删除评论或留言
router.delete('/:id', visParamsId, remove);

// 查：全部
router.get('/', findAll);

// 通过文章id删除所属评论
router.delete('/blogId/:id', visParamsId, removeByBlogId);

module.exports = router;
